package fast.loader;

import java.util.Arrays;
import java.util.List;

public enum Slot {
    head(0, "Head", false, Arrays.asList(1)),
    neck(1, "Neck", false, Arrays.asList(2)),
    shoulder(2, "Shoulder", true, Arrays.asList(3)),
    back(3, "Back", true, Arrays.asList(16)),
    chest(4, "Chest", true, Arrays.asList(5)),
    shirt(5, "Shirt", false,  Arrays.asList(4)),
    tabard(6, "Tabard", false, Arrays.asList(19)),
    wrist(7, "Wrist", true, Arrays.asList(9)),
    hands(8, "Hands", true, Arrays.asList(10)),
    waist(9, "Waist", false, Arrays.asList(6)),
    legs(10, "Legs", true, Arrays.asList(7)),
    feet(11, "Feet", true, Arrays.asList(8)),
    finger1(12, "Finger 1", true, Arrays.asList(11)),
    finger2(13, "Finger 2", true, Arrays.asList(11)),
    trinket1(14, "Trinket 1", false, Arrays.asList(12)),
    trinket2(15, "Trinket 2", false, Arrays.asList(12)),
    mainHand(16, "Main Hand", true, Arrays.asList(13,21,17)),
    offHand(17, "Off Hand", true, Arrays.asList(13,14,22));

    public static final Slot[] possibleSlots = new Slot[] {
        head, neck, shoulder, back, chest, shirt, tabard, wrist, hands, waist, legs, feet, finger1, finger2, trinket1, trinket2, mainHand, offHand
    };
    public static final Slot[] viewOrder = new Slot[] {
        head, hands, neck, waist, shoulder, legs, back, feet, chest, finger1, shirt, finger2, tabard, trinket1, wrist, trinket2, mainHand, offHand
    };
    private final int index;
    private final String name;
    private final boolean enchantable;
    private final List<Integer> inventorySlots;

    private Slot(int index, String name, boolean enchantable, List<Integer> inventorySlots) {
        this.index = index;
        this.name = name;
        this.enchantable = enchantable;
        this.inventorySlots = inventorySlots;
    }

    public int getIndex() {
        return index;
    }

    public String getName() {
        return name;
    }

    public boolean isEnchantable() {
        return enchantable;
    }

	public List<Integer> getInventorySlots() {
		return inventorySlots;
	}
}
